package pars.itqiqi.handler.conf;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import pars.itqiqi.handler.interceptor.LoginInterceptor;

/**
 * @author kevin_琪琪
 * @version 1.0
 * @description
 * @date 2022-07-13 16:27
 */
@Configuration
public class AuthenticationMvcConfiguration implements WebMvcConfigurer {

    @Autowired
    private LoginInterceptor loginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor)
                .addPathPatterns("/**");
    }
}
